All Questions
61 questions
2votes
0answers
496views
Bootstrap Modals Not Working With New JS Bundler Rails
I can not get the Bootstrap Modal to work using the new esbuild JSBundler / CSSBundler set up in Rails, the button just does nothing with no errors (using example as test). Using the GoRails Jumpstart ...
0votes
0answers
918views
Is it possible to put a modal inside a card?
I have a modal that's inside a Bootstrap Card for a confirmation if the user really wants to cancel a booking. The problem is that it doesn't show up when clicked. I see the fade effect and that's ...
0votes
1answer
320views
Uncaught TypeError: $(...).modal is not a function with activeadmin rails
I am trying to integrate a simple modal in activeadmin. My Gemfile: gem 'jquery-rails' gem 'popper_js' gem 'bootstrap' My application.js: //= require jquery //= require jquery_ujs //= require rails-...
0votes
2answers
2kviews
How can I use ajax to display Bootstrap 4 modal in Rails 6 app?
Currently I have a modal rendering for each piece on the page. It works but I don't want to render a modal for each piece each time the page is loaded. Here is the code where my modal is rendered now:...
0votes
1answer
630views
How to dismiss a bootstrap modal?
I have a controller in my Rails application which calls a js partial when a certain condition is met: my_controller if false == validation_result render :partial => 'my/show_modal.js.erb' end ...
0votes
1answer
172views
bootstrap working for dropdown, but not for modal
It's a bit of a weird problem, but it seems my bootstrap modal and bootstrap dropdown menu do not seem to work simultaneously. If I include in my layout the script <!-- <script src="https://...
2votes
1answer
1kviews
Render page with new form in modal instead of new page in Ruby on Rails/JS
I am unable to render a (bootstrap) modal instead of rendering the classic new.html.erb, used to to create a new room. Given the fact that I am new to JS and modals, I have the feeling I am lacking ...
0votes
1answer
815views
how do add a dialog to the bootstrap 4 modal button rails 5?
I have added a bootstrap modal to my rails 5 app successfully however I am trying to add a dialog similar to other rails form to ask them to confirm if they wish to continue. With this modal I need to ...
0votes
2answers
402views
Rails 5 client_side_validation not working on modal
I'm using gem 'client_side_validations' and gem 'client_side_validations-simple_form' and all validation WORKS FINE IN A NORMAL FORM, but not working when try to adapt in a bootstrap modal, this is ...
3votes
1answer
4kviews
Ruby on Rails 5.1 delete confirmation with Boostrap modal
I am making a simple blog application that has many articles. I successfully made a delete button for each article and the browser's default confirmation popup using: <%= link_to 'Delete' , article,...
1vote
1answer
349views
How to render a partial only when a user clicks the corresponding link?
So currently I have a button dropdown using bootstrap and depending on which item from the dropdown is selected javascript is used to either show or hide partials. These partials are actually shown ...
0votes
2answers
320views
Rails, Bootstrap Modal, trigger code on modal open
I'm using the Readable Gem, and have comments in a modal. I want to mark a comment as read only when the user opens up the Bootstrap modal. Can someone point me in the right direction to trigger the ...
0votes
1answer
1kviews
How to open a bootstrap modal from link_to content?
I'm creating a reddit clone, and clicking the login or signup text on the header opens a modal for the user to enter their credentials. I created a modal partial here: <div class="modal fade" id="...
7votes
1answer
3kviews
Bootstrap Modal not closing on data dismiss (Rails)
I have a rails application with an edit modal. The submit functionality works, but the close buttons do not do anything. Edit.js.erb: $("#modal-window").html("<%= escape_javascript(render 'users/...
-1votes
1answer
1kviews
How to "data-dismiss" bootstrap on rails?
My Code is as below : <div class="tr"> <button type="button" class="btn btn-default close-modal mr10" data-dismiss="modal">Close</button> <%= button_tag "Submit", ...